package com.cherry.web.controller.system;

import com.cherry.common.core.controller.BaseController;
import com.cherry.common.core.domain.AjaxResult;
import com.cherry.system.domain.response.SysProvincialData;
import com.cherry.system.service.ISysPostService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: 孙晨阳
 * @Date: 2023/3/12 18:04
 * @Version 1.0
 */
@Controller
@RequestMapping("/system/main")
public class SysMainController extends BaseController {

    @Resource
    private ISysPostService postService;

    /**
     * 获取各省份的岗位数量
     *
     * @return 结果
     */
    @GetMapping("chinaMapData")
    @ResponseBody
    public AjaxResult chinaMapData() {

        List<SysProvincialData> list = postService.getProvincialData();

        return success(list);
    }

    /**
     * 获取岗位数量排名TOP5的公司数据
     *
     * @return 结果
     */
    @GetMapping("companyRanking")
    @ResponseBody
    public AjaxResult companyRankingData() {

        return success();
    }

}
